<?php

class Control_Model_Form_Contact extends Zend_Form {

    public function __construct($options = null) {
        parent::__construct($options);
        $this->setName('Contact');

        $id = new Zend_Form_Element_Hidden('id');
        $id->addFilter('Int');

        $type = new Zend_Form_Element_Select('type');
        $type->setLabel('Please select type:')
                ->setMultiOptions(array(
                    'adress' => 'Adress',
                    'phone' => 'Phone',
                    'link' => 'E-mail adress'
                ));

        $title = new Zend_Form_Element_Text('title');
        $title->setLabel('Text:')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty')
                ->setAttrib('size', 50);

        $mail = new Zend_Form_Element_Text('mail');
        $mail->setLabel('E-mail adress (if type E-mail adress):')
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->setAttrib('size', 50);

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');

        $this->addElements(array($id, $type, $title, $mail, $submit));
    }

}